package com.project.bean;

import java.time.LocalDate;

/**
 * 评价实体类
 */
public class ReviewBean {
    /**评价内容id*/
    private int id;
    /**评价内容*/
    private String content;
    /**评论人*/
    private String userName;
    /**评分*/
    private double score;
    /**评价日期*/
    private LocalDate date = LocalDate.now();
    /**商品对象*/
    private GoodsBean goods;
    /**服务对象*/
    private ServeBean serve;

    public ReviewBean() {
    }

    public ReviewBean(String content, String userName, double score, LocalDate date, Integer goodsId, Integer serveId) {
        this.content = content;
        this.userName = userName;
        this.score = score;
        this.date = date;
        this.goods = new GoodsBean();
        this.goods.setId(goodsId);
        this.serve = new ServeBean();
        this.serve.setId(serveId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public GoodsBean getGoods() {
        return goods;
    }

    public void setGoods(GoodsBean goods) {
        this.goods = goods;
    }

    public ServeBean getServe() {
        return serve;
    }

    public void setServe(ServeBean serve) {
        this.serve = serve;
    }

    @Override
    public String toString() {
        return "ReviewBean{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", userName='" + userName + '\'' +
                ", score=" + score +
                ", date=" + date +
                ", goods=" + goods +
                ", serve=" + serve +
                '}'+"\n";
    }
}
